<!DOCTYPE html>
<html>
<head lang="en">
  <title>A</title>
</head>
<body>
<script>
window.addEventListener("storage", function (e) {
  alert(e.newValue);
});
</script>
</body>
</html>